package com.maxd.respository.helpTask;

import com.maxd.model.HelpClassify;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface HelpClassifyRepository extends Repository<HelpClassify, Long> {

    @Query(value = "select * from help_classify where id=:id",nativeQuery = true)
    HelpClassify selectById(@Param("id") Long id);

    @Query(value = "select * from help_classify where classify_type=:classifyType order by sort",nativeQuery = true)
    List<HelpClassify> selectList(@Param("classifyType") Integer classifyType);

}
